.qmsg {
  &.qmsg-wrapper {
    position: fixed;
    top: 20px;
    left: 0;
    z-index: 1010;
    width: 100%;
    pointer-events: none;
    color: rgba(0, 0, 0, .55);
    font-size: 13px;
    font-variant: tabular-nums;
    font-feature-settings: "tnum";
  }

  .qmsg-item {
    padding: 8px;
    text-align: center;
    animation-duration: .3s;

    .qmsg-content {
      text-align: left;
      position: relative;
      display: inline-block;
      padding: 10px 12px;
      background: #fff;
      border-radius: 4px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
      pointer-events: all;
      max-width: 80%;
      min-width: 80px;

      [class^="qmsg-content-"] {
        display: flex;
        align-items: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;

        .qmsg-icon {
          display: inline-block;
          height: 16px;

          &:first-child {
            margin-right: 8px;
          }
        }

        .qmsg-icon-close {
          cursor: pointer;
          color: rgba(0, 0, 0, .45);
          transition: color .3s;
          margin-left: 6px;

          &:hover > svg path {
            stroke: #555;
          }
        }

        // 计数颜色
        .qmsg-count {
          display: inline-block;
          position: absolute;
          left: -8px;
          top: -8px;
          color: #fff;
          font-size: 12px;
          text-align: center;
          height: 16px;
          line-height: 16px;
          border-radius: 3px;
          min-width: 16px;
          animation-duration: .3s;
        }
      }

      &-info {
        color: #909399;

        .qmsg-count {
          background-color: #909399;
        }
      }

      &-warning {
        color: #E6A23C;

        .qmsg-count {
          background-color: #E6A23C;
        }
      }

      &-error {
        color: #F56C6C;

        .qmsg-count {
          background-color: #F56C6C;
        }
      }

      &-success {
        color: #67C23A;

        .qmsg-count {
          background-color: #67C23A;
        }
      }

      &-loading {
        color: #409eff;

        .qmsg-count {
          background-color: #409eff;
        }
      }
    }
  }

  .animate-turn {
    animation: MessageTurn 1s linear infinite;
  }

  @keyframes MessageTurn {
    0% {
      transform: rotate(0deg);
    }
    25% {
      transform: rotate(90deg);
    }
    50% {
      transform: rotate(180deg);
    }
    75% {
      transform: rotate(270deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }

  @keyframes MessageMoveOut {
    0% {
      max-height: 150px;
      padding: 8px;
      opacity: 1
    }

    to {
      max-height: 0;
      padding: 0;
      opacity: 0
    }
  }

  @keyframes MessageMoveIn {
    0% {
      transform: translateY(-100%);
      transform-origin: 0 0;
      opacity: 0
    }

    to {
      transform: translateY(0);
      transform-origin: 0 0;
      opacity: 1
    }
  }

  @keyframes MessageShake {
    0%, 100% {
      transform: translateX(0px);
      opacity: 1;
    }

    25%, 75% {
      transform: translateX(-4px);
      opacity: 0.75;
    }

    50% {
      transform: translateX(4px);
      opacity: 0.25;
    }
  }
}
